import axiosInstance from "../utils/axios.ts";
import type {ProjectDetailDTO, ProjectDetailVO} from "../types/project";

export const getProjectDetail = (project_id: number) => {
    return axiosInstance.post<any, ProjectDetailDTO[]>("/progress/getList", undefined,{
        params: {
            id: project_id
        }
    });
}

export const addProjectDetail = (projectDetail: ProjectDetailVO) => {
    return axiosInstance.post<any, boolean>("/progress/save", projectDetail)
}

export const deleteProjectDetail = (id: number) => {
    return axiosInstance.delete<any, boolean>("/progress/delete", {
        params: {
            id
        }
    })
}